package actioncombination.logic.agent;

import actioncombination.common.value.DoubleValue;
import actioncombination.logic.agent.action.Action;
import actioncombination.common.value.Value;
import actioncombination.logic.environment.*;
import actioncombination.logic.agent.Perception;
import java.util.HashMap;
import java.util.Map;
import java.util.TreeMap;


/**
 * @author Jorge M. Roa
 * @version 1.0
 * @created 08-Mar-2007 13:16:03
 */
public abstract class AgentState extends State {
    
    private int id;
    private Map customProperties;
    private Value value=new DoubleValue(0.5);
    private Map<Action, Value> actionValues=new HashMap<Action, Value>();
     
    public AgentState() {
        
       
    }
   
    public Map getCustomProperties() {
        if (customProperties == null) {
            customProperties = new HashMap();
        }
        return customProperties;
    }

    public void setCustomProperties(Map customProperties) {
        this.customProperties = customProperties;
    }

    public Object getValueOfCustomField(String name) {
        return getCustomProperties().get(name);
    }

    public void setValueOfCustomField(String name, Object value) {
        getCustomProperties().put(name, value);
    }

    public Value getValue() {
        return value;
    }

    public void setValue(Value value) {
        this.value = value;
    }
  
    public int getId() {
        return id;
    }

    public void setId(int id) {
        this.id = id;
    }

    public Map<Action, Value> getActionValues() {
        return actionValues;
    }

    public void setActionValues(Map<Action, Value> actionValues) {
        this.actionValues = actionValues;
    }
}

